{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form name="myform" action="" method="post">	
                <div class="box-header with-border">
                    <span class="fa fa-exchange" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">调课安排</p>
                </div>
                <div class="box-body">
                      <div class="form-group" >
						  <label for="inputPassword3" class="col-sm-4 control-label text-right">
							   老师：
						  </label>
						  <div class="input-group col-sm-4 col-xs-12">
							   <select class="form-control" id="s1" onchange="a()" name="from_staff">
                                      <option>请选择</option>
									  {%foreach from=$data_lists key=key item=value%}
									  <option value="staff_{%$key%}">{%$value.name%}</option>
									  {%/foreach%}
                                </select>
						  </div> 
				       </div>
						{%foreach from=$data_lists key=key item=value%}
                         <div class="form-group tea" id="staff_{%$key%}" style="display:none">
                              <label class="col-sm-4 control-label text-right">
                                   班级学科：
                              </label>

                              <div class="col-sm-4 col-xs-12">
									{%foreach from=$value.data key=k item=v%}
                                    <label class="choice"><input type="checkbox" name="pids[]" value="{%$k%}"> {%$v%}</label>
									{%/foreach%}
                              </div> 
                        </div>
						{%/foreach%}
                        <div style="clear:both"></div>
                         <div class="form-group" >
                              <label for="inputPassword3" class="col-sm-4 control-label text-right">
                                   新科任：
                              </label>
                              <div class="input-group col-sm-4 col-xs-12">
                                   <select class="form-control" name="to_staff">
								   {%foreach from=$staff_lists key=key item=value%}
                                          <option value="{%$value.staff_id%}">{%$value.staff_name%}</option>
								   {%/foreach%}
                                    </select>
                              </div> 
                        </div>
                        <div class="form-group" >
                              <label for="inputPassword3" class="col-sm-4 control-label text-right">
                                   启用时间：
                              </label>
                              <div class="input-group col-sm-4 col-xs-12">
                                    <input type="text" class="form-control" id="starttime" name="start_time" value="{%$start_time%}">
                                    <div class="input-group-addon">
                                         <i class="fa fa-calendar"></i>
                                    </div>
                              </div> 
                        </div>
				   </div><!--box-body -->
                   <div class="box-footer text-center">
                        <button type="submit" class="btn btn-primary">确 定</button>
                   </div>
               </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
{%include file="index.footer.tpl.php"%}
   <script type="text/javascript">
        $(document).ready(function(){
            $(".tea").hide();
        });
        function a()
        {
			$(".tea").hide();
            var val = $("#s1").val();
			$("#"+val).show();
        }
    </script>
 <script>
  $(function() {
    $( "#starttime" ).datepicker({
      changeMonth: true,
	  changeYear: true,
    });
  });
  </script>
